#include "VStdAfx.h"
#include "VRenderTarget.h"
#include "KMTRender.h"


VRenderTarget::VRenderTarget(void)
{
}


VRenderTarget::~VRenderTarget(void)
{
}


//////////////////////////////////////////////////////////////////////////
//
//////////////////////////////////////////////////////////////////////////
VRenderWindow::~VRenderWindow()
{
	if (m_RViewport)
	{
		m_RViewport->DeleteThis();
	}
}

void VRenderWindow::Resize(UINT Width, UINT Height, BOOL FullScreen)
{
	VASSERT(VEnv.Render);
	VEnv.Render->SuspendRenderThread();
	{
		if (m_RViewport == NULL)
		{
			m_RViewport = g_RI->CreateRenderWindow(m_hWnd, Width, Height, FullScreen);
		}else
		{
			m_RViewport->Resize(Width, Height, FullScreen);
		}
	}
	VEnv.Render->ResumeRenderThread();
}

void VRenderWindow::BeginRender()
{
	g_Render->BeginRenderWindow(this);
}

void VRenderWindow::EndRender()
{
	g_Render->EndRenderWindow(this);
}

void VRenderWindow::RT_Init()
{

}

void VRenderWindow::RT_Shutdown()
{

}

void VRenderWindow::RT_Update()
{

}

